import { _decorator, AudioSource, Component, Node } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('RuleUI')
export class RuleUI extends Component {
    @property(AudioSource)
    public ClickAudio: AudioSource;
    start() {
        this.node.on("mouse-up",this.onMouseUpHandler,this);
    }

    private onMouseUpHandler()
    {
        this.ClickAudio.play();
        setTimeout(() => {
            this.node.active = false;
        }, 200);
    }

    update(deltaTime: number) {
        
    }
}

